package com.lanxiaoye.shoppingSystem.test;

import com.lanxiaoye.shoppingSystem.util.Util;
import org.junit.Test;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

public class ABC {
	
	@Test
	public void test1() throws ParseException {
		SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
		Date d = sdf.parse("2016-06-10");
		long timestamp = d.getTime() / 1000;
		System.out.println(timestamp);
		System.out.println(Util.timestampToStr(timestamp + 86400));
		
		System.out.println("2016-06-10".matches("20[0-9]{2}-[0-9]{2}-[0-9]{2}"));
	}
}
